package learn.mqtt.controller;

import learn.mqtt.service.ProviderService;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class Demo {

    @Resource
    private ProviderService providerService;

    @GetMapping("/hello")
    public String hello() throws MqttException {
        return providerService.provider();
    }

}
